package org.lyy.dao;


import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.aspectj.weaver.ast.Or;
import org.lyy.entity.Order;
import org.lyy.entity.ProductInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderDao {

    @Insert("insert into lry(Id,orderAmount,payStatus,currentDate) values(#{Id},#{orderAmount},#{payStatus},#{currentDate})")
    public void create(Order order);

    @Select("select * from lry")
    public void select();

    @Delete("delete from lry where Id=#{orderId}")
    public void delete(String orderId);

    @Update("update lry set payStatus=#{payStatus} where Id=#{Id}")
    public void update(Order lry);

    @Select("select * from lry where payStatus=#{payStatus}")
    public List<Order> searchStatus(String payStatus);
}
